<div class="modal-header" id="scope">
	<h3 class="modal-title" ng-if="param.type == 'insert'">新增</h3>
	<h3 class="modal-title" ng-if="param.type == 'update'">修改</h3>
</div>
<div class="modal-body">
	<form name="myForm" class="form-horizontal form-validation">
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="form-group" ng-if="param.type == 'update'">
					<label class="col-sm-3 control-label">车辆编号：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="编号" ng-model="param.data.code" ng-readonly="true"/>
					</div>
					<p>不可修改。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>车辆型号：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="型号" ng-model="param.data.model" required/>
					</div>
					<p>必填。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>车牌号：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="车牌号" ng-model="param.data.number" required/>
					</div>
					<p>必填。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>座位数：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" ng-maxlength="2" placeholder="座位数" ng-model="param.data.seats" ng-pattern="/^[0-9]*$/" required/>
					</div>
					<p>必填，整数。</p>
				</div>
<!--				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>是否年检：</label>
					<div class="col-sm-5" style="margin-top: 5px;">
						<label><input type="radio"  name="inspected" value="true"  ng-model="param.data.inspected"  ng-checked="param.data.inspected==true">是</label>
						<label style="margin-left: 50px"><input type="radio"  name="inspected"value="false"  ng-model="param.data.inspected" ng-checked="param.data.inspected==false">否</label>
					</div>
				</div>-->
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>主驾司机：</label>
					<div class="col-sm-5">
						<ui-select ng-model="driver.selected" theme="bootstrap">
							<ui-select-match placeholder="主驾司机">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="driver in driver | propsFilter:{name: $select.search}">
								<span ng-bind-html="driver.name | highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
					</div>
					<p>只有状态为未激活和已激活的司机才会出现在列表中。主驾司机选择，必选。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>所属单位：</label>
					<div class="col-sm-5">
						<ui-select ng-model="orglist.selected" theme="bootstrap">
							<ui-select-match placeholder="所属组织">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="org in orglist | propsFilter:{name: $select.search}">
								<span ng-bind-html="org.name | highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
					</div>
					<p>车辆所属的单位选择。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">副驾司机：</label>
					<div class="col-sm-5" class="input-group">
						<ui-select ng-model="coDriver.selected" theme="bootstrap">
							<ui-select-match placeholder="副驾司机">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="coDriver in coDriver | propsFilter:{name: $select.search}">
								<span ng-bind-html="coDriver.name | highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
					</div>
					<span class="input-group-btn">
							<button ng-click="coDriver.selected = undefined"
								class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
					</button>
					</span>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">备驾司机：</label>
					<div class="col-sm-5">
						<ui-select ng-model="thirdDriver.selected" theme="bootstrap">
							<ui-select-match placeholder="备驾司机">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="thirdDriver in thirdDriver | propsFilter:{name: $select.search}">
								<span ng-bind-html="thirdDriver.name | highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
					</div>
					<span class="input-group-btn">
							<button ng-click="thirdDriver.selected = undefined"
								class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
					</button>
					</span>
				</div>
				<div class="form-group" ng-show="param.type == 'insert'">
					<label class="col-sm-3 control-label">车辆保险：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="保险" readonly="true" ng-model="insurance.number" />
					</div>
					<p>
						<button class="btn m-b-xs btn-sm btn-default btn-addon" type="button" ng-click="add()">
							<i class="fa fa-plus"></i> 添加保险</button>
					</p>
				</div>
				<div class="form-group" ng-show="param.type == 'update'">
					<label class="col-sm-3 control-label">车辆保险：</label>
					<div class="col-sm-5" ng-if="param.data.vehicleInsuranceId!=0">
						<input type="text" class="form-control" placeholder="保险" readonly="true" ng-model="insurance.number" />
					</div>
					<div class="col-sm-5"  ng-show="param.data.vehicleInsuranceId==0">
						<p style="margin-top:7px">该车辆暂未添加保险，可点击右侧按钮进行添加。</p>
					</div>
					<p ng-show="param.data.vehicleInsuranceId==0">
						<button class="btn m-b-xs btn-sm btn-default btn-addon"
								type="button" ng-click="add()">
							<i class="fa fa-plus"></i> 添加保险
						</button>
					</p>
					<p ng-show="param.data.vehicleInsuranceId!=0">
						<button class="btn m-b-xs btn-sm btn-default btn-addon" type="button" ng-click="update()">
							<i class="fa fa-pencil fa-fw m-r-xs"></i> 修改保险</button>
					</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">是否年检：</label>
					<div class="col-sm-5">
						<label class="i-switch m-t-xs m-r bg-info"> <input
								type="checkbox" name="inspected" ng-model="param.data.inspected"
								ng-checked="param.data.inspected==true"> <i></i>
						</label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-3 control-label">使用年限：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" ng-maxlength="3" placeholder="使用年限" ng-model="param.data.years" ng-pattern="/^[0-9]*$/" />
					</div>
					<p>选填，整数，默认为0。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">行驶里程数：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" ng-maxlength="10" placeholder="行驶里程数" ng-model="param.data.mileage" ng-pattern="/^[0-9]*$/"
						/>
					</div>
					<p>选填，整数，默认为0，公里为单位。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">车主姓名：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="姓名" ng-model="param.data.owner" />
					</div>
					<p>选填。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">车主手机号：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="手机号" ng-model="param.data.phone" ng-pattern="/^[]|(1[3|4|5|7|8][0-9]\d{8})$/"
						/>
					</div>
					<p>11位手机号，选填。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">车主身份证号：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="身份证号" ng-model="param.data.idCard" ng-pattern="/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/"
						/>
					</div>
					<p>18位身份证号，选填。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">车主住址：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="住址" ng-model="param.data.address" />
					</div>
					<p>选填。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">备注：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="备注" ng-model="param.data.remark" />
					</div>
					<p>选填。</p>
				</div>
			</div>
			<footer class="panel-footer text-right bg-light lter">
				<button class="btn btn-default" type="button" ng-click="cancel()">取消</button>
				<button type="submit" class="btn btn-success" ng-click="ok()">提交</button>
			</footer>
		</div>
	</form>
</div>